<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <base href="${pageContext.request.contextPath}/">
    <title>猫咪列表</title>
</head>
<body>

<div style="text-align: center">
    <h1>猫咪列表</h1>
    <a href="views/insert.jsp">新增</a>
    <table border="1" width="600" align="center">
        <tr>
            <th>编号</th>
            <th>名字</th>
            <th>年龄</th>
            <th>品种</th>
            <th>主人</th>
        </tr>
        <c:forEach items="${list}" var="list">
            <tr>
                <th>${list.cno}</th>
                <th>${list.cname}</th>
                <th>${list.cage}</th>
                <th>${list.species}</th>
                <th>${list.master}</th>
                <th>
                    <a href="selectCat.do?cno=${list.cno}" >修改</a>
                    <a href="deleteCat.do?cno=${list.cno}" onclick="return confirm('确定删除？')">删除</a>
                </th>
            </tr>
        </c:forEach>
    </table>
</div>

</body>
</html>